package com.tourism.core.common.utils;

import lombok.Getter;

 /** 
 * 全局统一返回结果枚举类
  * @author qy
  */

@Getter
public enum ResultCodeEnum {
    SUCCESS(200, "成功"),
    FAIL(201, "失败"),


     // 权限认证相关,
     AUTH_NOT_PERMISSION(401, "权限不足, 请联系管理员"),
     TOKEN_NOT_EXIST(205, "token不存在"),
     AUTH_SIGN_INVALID(205, "无效签名"),
     AUTH_ALG_INVALID(205, "无效算法"),
     AUTH_TOKEN_INVALID(205, "token无效"),
     AUTH_TOKEN_EXPIRED(205, "token过期"),
     AUTH_ERROR(205, "用户认证失败, 请重新登录"),
     AUTH_NOT_LOGIN(205, "未登录, 请登录"),

     CRON_ERROR(210, "cron 表达式格式错误!"),
     CLASS_NOT_FIND(210, "类不存在"),

     CAPTCHA_NOT_EXIST(207, "验证码不存在"),
     CAPTCHA_ERROR(208, "验证码错误"),
     USERNAME_PASSWORD_ERROR(207, "用户名或密码错误"),
     OLD_PASSWORD_ERROR(208, "旧密码错误"),

     FILE_NOT_FIND(208, "文件不存在"),
     FILE_TOO_LARGE(209, "文件过大"),
     FILE_UPLOAD_ERROR(212, "文件上传失败"),

     NODE_HAS_CHILDREN(210, "该节点下有子节点，请删除子节点"),

     DATA_EXPORT_ERROR(211, "数据导出失败");




    private final Integer code;

    private final String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
